<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <section class="panel">
        <h1>添加账户</h1>
        <form action="http://localhost:3000/adds" method="POST"  >
            账号:<input type="text" name="username" >
            密码:<input type="text" name="mima" >
            <input type="submit" value="添加">
        </form>

        {{!-- <h1>添加账户</h1>
        <form action="http://localhost:3000/add" method="GET" >
            账号:<input type="text" name="username" >
            密码:<input type="text" name="mima" >
            <input type="submit" value="添加">
        </form> --}}

        {{!-- {{#obj.title}} --}}
        <table>
            <thead>
                <tr>
                    <th>地址</th><th>序号</th><th>用户名</th><th>密码</th>
                </tr>
            </thead>
            <tbody id="tableList">
                {{#each lists}}
                <tr>
                    <td>{{@this}}</td>
                    <td>{{addOne @index}}</td>
                    <td>{{username}}</td>
                    <td>{{mima}}</td>
                    <td>{{_id}}
                        <form action="http://localhost:3000/delete" method="POST">
                             账号:<input type="hidden" name="_id" value="{{_id}}" >
                            <input type="submit" value="删除">
                        </form>
                    </td>
                </tr>
                {{/each}}
            </tbody>
        </table>
    </section>
    
</body>
</html>